<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_all.js"></script> 
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_config.js"></script>

		<c:if test="${message }">
		  <div style="width:98%; height:50px;">
		            <strong> 添加成功</strong>
		  </div>  
		</c:if>
<form action="<%=basePath %>backend/addzy" method="post" id='ResearchLabForm'>
			
           <div class="row div-common">
          <div class="span6 input-prepend" >
                 <span class="add-on">专业名称</span>
                 <input id='title' type="text" name="name" >
              <span></span>
              </div> 
              </div>
            <div class='row div-common' >
                <h3>专业简介：</h3>
              <div style='margin-top: 10px;'>
			  
		       <script  id="editor" ></script>
		       </div>
            </div>
		      <div class='row div-common' >
		       <h3>  培养计划：</h3>
			  <div style='margin-top: 10px;'>
			  
		       <script  id="editor1" ></script>
		       </div>
		      </div>
	    <!-- <input type="checkbox" value="0" name='index' id='index'  />首页新闻 -->
		<input  type="submit" value="完成" style="margin-left: 600px;margin-top: 10px;" class="btn btn-info" onclick="return getContent();"/></div>
		<input id="intro" type="hidden" name="introduce">
		<input id="plan" type="hidden" name="majorPlan">
		<input id='ids' name='ids' type="hidden" >
	</form>
	
	<script type="text/javascript">
	var ue = UE.getEditor('editor');
	var ue1 = UE.getEditor('editor1');
    function getContent() {
        var str= ue.getContent();
        var plan = ue.getContent();
       // alert(str);
        //document.getElementById('content').value=str;
        $("#intro").val(str);
        $("#plan").val(plan);
        var str="";
        var plan="";
       
        $("#ids").val(id);
        if(document.getElementById('title').value.length==0||str.length==0)
        	{
        	  alert('还有尚未填写的内容！');
        	  document.getElementById('title').focus();
        	  return false;
        	}
        
        return true;
    }
  
</script>
